//
//  CashHomeTableCell.m

#import "CashHomeTableCell.h"
static NSString * CashHomeTableCellId = @"CashHomeTableCellId";
@interface CashHomeTableCell()
@property (nonatomic, strong)UIImageView * cashHomeImageView;
@property (nonatomic, strong)UILabel * cashHomeTitleLab;
@property (nonatomic, strong)UILabel * cashHomeTimeLab;
@property (nonatomic, strong)UILabel * cashHomeMoneyLab;
@end
@implementation CashHomeTableCell
+ (instancetype)supplyRankTableCell:(UITableView *)tableView{
    CashHomeTableCell * cashHomeTableCell = [tableView dequeueReusableCellWithIdentifier:CashHomeTableCellId];
    if (!cashHomeTableCell) {
        cashHomeTableCell = [[CashHomeTableCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CashHomeTableCellId];
    }
    cashHomeTableCell.backgroundColor = [UIColor clearColor];
    cashHomeTableCell.selectionStyle = UITableViewCellSelectionStyleNone;
    cashHomeTableCell.accessoryType = UITableViewCellAccessoryNone;
    return cashHomeTableCell;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self creatSubView];
    }
    return self;
}
- (void)creatSubView{
    self.cashHomeImageView = [[UIImageView alloc] init];
    self.cashHomeImageView.userInteractionEnabled = YES;
    [self.contentView addSubview:self.cashHomeImageView];
    [self.cashHomeImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@(20));
        make.centerY.equalTo(self.contentView);
        make.width.equalTo(@(40));
        make.height.equalTo(@(40));
    }];
    
    self.cashHomeTitleLab = [[UILabel alloc] init];
    self.cashHomeTitleLab.font = [UIFont systemFontOfSize:15 weight:UIFontWeightSemibold];
    self.cashHomeTitleLab.textColor = UIColor.blackColor;
    self.cashHomeTitleLab.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:self.cashHomeTitleLab];
    [self.cashHomeTitleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.cashHomeImageView.mas_right).offset(10);
        make.centerY.equalTo(self.cashHomeImageView);
        make.height.equalTo(@(18));
    }];
    
    self.cashHomeTimeLab = [[UILabel alloc] init];
    self.cashHomeTimeLab.font = [UIFont systemFontOfSize:12 weight:UIFontWeightRegular];
    self.cashHomeTimeLab.textColor = UIColor.blackColor;
    self.cashHomeTimeLab.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:self.cashHomeTimeLab];
    [self.cashHomeTimeLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.cashHomeTitleLab);
        make.top.equalTo(self.cashHomeTitleLab.mas_bottom);
        make.height.equalTo(@(18));
    }];
    
    self.cashHomeMoneyLab = [[UILabel alloc] init];
    self.cashHomeMoneyLab.font = [UIFont systemFontOfSize:15 weight:UIFontWeightBold];
    self.cashHomeMoneyLab.textColor = UIColor.blackColor;
    self.cashHomeMoneyLab.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:self.cashHomeMoneyLab];
    [self.cashHomeMoneyLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.cashHomeTitleLab);
        make.centerY.equalTo(self.contentView);
        make.height.equalTo(@(18));
    }];
}
-(void)setCashAllDataMdl:(CashAllDataModel *)cashAllDataMdl{
    _cashAllDataMdl = cashAllDataMdl;
    if (_cashAllDataMdl) {
        
    }
}
@end
